/**
 * @file lv_ledstrip.h
 *
 */

#ifndef LV_LEDSTRIP_H
#define LV_LEDSTRIP_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include "../toolbar/lv_toolbar.h"

#if LV_USE_LEDSTRIP

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Create a ledstrip object,led default off
 * @param parent    pointer to an object, it will be the parent of the new ledstrip
 * @return          pointer to the created ledstrip(toolbar object)
 */
lv_obj_t * lv_ledstrip_create(lv_obj_t * parent);

/**
 * set number of led`s 
 * @param obj     pointer to a ledstrip
 * @param count   the total number of led`s
 */
void lv_ledstrip_set_count(lv_obj_t * obj,  uint8_t count);

/**
 * all led are turned off
 * @param obj   pointer to a ledstrip
 */
void lv_ledstrip_off_all(lv_obj_t * obj);

/**
 * turn off the light at the specified location
 * @param obj   pointer to a ledstrip
 * @param pos        location of led
 */
void lv_ledstrip_off(lv_obj_t * obj, uint8_t pos);

/**
 * turn on the light at the specified location
 * @param obj   pointer to a ledstrip
 * @param pos        location of led
 */
void lv_ledstrip_on(lv_obj_t * obj, uint8_t pos);

/**********************
 *      MACROS
 **********************/

#endif /*LV_USE_LEDSTRIP*/

#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif /*LV_LEDSTRIP_H*/
